package tech.aistar.service;


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


import tech.aistar.entity.Sinchoice;
import tech.aistar.entity.Wrongtopic;
import tech.aistar.service.impl.WrongtopicServiceImpl;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)

@ContextConfiguration(locations = "classpath:spring/spring-*.xml")
public class testWrongtopicService {

    @Autowired
    private WrongtopicServiceImpl wrongtopicService;


    @Test
    public void testfindAll(){
        List<Wrongtopic> wrongtopicList = wrongtopicService.findAll();
        System.out.println(wrongtopicList);
    }

    @Test
    public void testfindByPaperId(){
        List<Wrongtopic> byParperId = wrongtopicService.findByParperId(1L);
        System.out.println(byParperId);
    }

    @Test
    public void testadd(){
        Wrongtopic wrongtopic = new Wrongtopic(1L,1L,1L,1L,"b");
        int i = wrongtopicService.insertWrongtopic(wrongtopic);
        System.out.println(i);
    }
}
